/**
 * Created by xc on 2018/03/24.
 */

var common = require('../../common');
var pool = require('../index');
var mysql = require('mysql');
var YjxBaseModel = require('./YjxBaseModel');
var async = require( 'async'); // 同步控制

//--------------------------------------------------------------------------------------
// Schema 结构
var YjxTradeOdrDtlPtsModel = function(obj){
    YjxBaseModel.call(this,obj);

  //`detail_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单明细id',
  //`detail_no` varchar(50) NOT NULL DEFAULT '' COMMENT 'itb自定义子订单号',
  //`order_id` bigint(20) NOT NULL COMMENT '订单id',
  //`uni_item_id` bigint(20) NOT NULL COMMENT '统一项目id（充值类商品id）',
  //`price_id` bigint(20) DEFAULT NULL COMMENT '计量价格id（套餐id）',
  //`qty` bigint(20) NOT NULL DEFAULT '0' COMMENT '数量',
  //`unit` varchar(20) NOT NULL DEFAULT '月' COMMENT '计量单位',
  //`fee` bigint(12) NOT NULL DEFAULT '0' COMMENT '订单明细金额（单位为rmb分）',
  //`add_pts` bigint(12) NOT NULL DEFAULT '0' COMMENT '充值积分额',
  //`state` int(3) NOT NULL DEFAULT '0' COMMENT 'VIP(子)订单状态:',
  //`desc` varchar(200) DEFAULT '' COMMENT '订单描述',
  //`valid_time` datetime DEFAULT NULL COMMENT '本订单有效开始日期（待定）',
  //`expiry_time` datetime DEFAULT NULL COMMENT '本订单有效截止日期（待定）',
  //`create_time` datetime NOT NULL,
  //`update_time` datetime NOT NULL,
  //`update_by` varchar(50) NOT NULL,
  //`del_flg` int(1) NOT NULL DEFAULT '0',
};

YjxTradeOdrDtlPtsModel.prototype = new YjxBaseModel();

// 取得表名
YjxTradeOdrDtlPtsModel.prototype.getTableName = function(){
    return 'yjx_trade_odr_dtl_pts';
};
// 取得查询语句中where 后面匹配主键的条件（需要各派生类进行重载）
YjxTradeOdrDtlPtsModel.prototype.getWhereConditionOfKeyEqual = function(){
    return 'detail_id='+this.detail_id;
};



//--------------------------------------------------------------------------------------
// 导出
module.exports = YjxTradeOdrDtlPtsModel;